package com.aspose.cells;

class zbfr extends zcj {
   static com.aspose.cells.b.a.b.zn[] i = new com.aspose.cells.b.a.b.zn[]{new com.aspose.cells.b.a.b.zn(0, 0), new com.aspose.cells.b.a.b.zn(21600, 21600), new com.aspose.cells.b.a.b.zn(Integer.MIN_VALUE, -2147483647), new com.aspose.cells.b.a.b.zn(-2147483646, -2147483645), new com.aspose.cells.b.a.b.zn(-2147483644, -2147483643)};
   static int[] j = new int[]{46340, 1, 24576, 32768};
   static com.aspose.cells.b.a.b.zn[] k = new com.aspose.cells.b.a.b.zn[]{new com.aspose.cells.b.a.b.zn(10800, 0), new com.aspose.cells.b.a.b.zn(3160, 3160), new com.aspose.cells.b.a.b.zn(0, 10800), new com.aspose.cells.b.a.b.zn(3160, 18440), new com.aspose.cells.b.a.b.zn(10800, 21600), new com.aspose.cells.b.a.b.zn(18440, 18440), new com.aspose.cells.b.a.b.zn(21600, 10800), new com.aspose.cells.b.a.b.zn(18440, 3160), new com.aspose.cells.b.a.b.zn(-2147483644, -2147483643)};
   static zfh[] l = new zfh[]{new zfh(16384, 10800, 1030, 0), new zfh(16384, 10800, 1031, 0), new zfh(16384, 10800, 1032, 0), new zfh(16384, 10800, 1033, 0), new zfh(8192, 327, 0, 0), new zfh(8192, 328, 0, 0), new zfh(16393, 10800, 1034, 0), new zfh(16394, 10800, 1034, 0), new zfh(16393, 10800, 1035, 0), new zfh(16394, 10800, 1035, 0), new zfh(8206, 1036, 0, 11), new zfh(8206, 1036, 11, 0), new zfh(24584, 1038, 1037, 0), new zfh(8192, 327, 0, 10800), new zfh(8192, 328, 0, 10800)};
   private int[] n = new int[]{1350, 25920};
   static zayx[] m = new zayx[]{new zayx(new com.aspose.cells.b.a.b.zn(3200, 3200), new com.aspose.cells.b.a.b.zn(18400, 18400))};

   zbfr(zn var1, float var2, float var3, zbkq var4) {
      super(var1, var2, var3, var4);
   }

   void a() {
      int var1 = (int)this.e.h();
      int var2 = (int)this.e.i();
      int var3 = (int)this.e.f();
      int var4 = (int)this.e.g();
      com.aspose.cells.b.a.b.zq var5 = new com.aspose.cells.b.a.b.zq((float)var1, (float)var2, (float)var3, (float)var4);
      com.aspose.cells.b.a.b.a.zf var6 = this.a.e();
      this.a.a(4);
      int var7 = 0;
      int var8 = 0;
      if (this.e.l.a.size() > 0) {
         switch(this.e.l.a.size()) {
         case 1:
            if (((zak)this.e.l.a.get(0)).b() == 327) {
               var7 = com.aspose.cells.b.a.ze.f(((zak)this.e.l.a.get(0)).a());
               var8 = 25920;
            } else if (((zak)this.e.l.a.get(0)).b() == 328) {
               var7 = 1350;
               var8 = com.aspose.cells.b.a.ze.f(((zak)this.e.l.a.get(0)).a());
            }
            break;
         case 2:
            if (((zak)this.e.l.a.get(0)).b() == 327 && ((zak)this.e.l.a.get(1)).b() == 328) {
               var7 = com.aspose.cells.b.a.ze.f(((zak)this.e.l.a.get(0)).a());
               var8 = com.aspose.cells.b.a.ze.f(((zak)this.e.l.a.get(1)).a());
            } else if (((zak)this.e.l.a.get(0)).b() == 327 && ((zak)this.e.l.a.get(1)).b() == 329) {
               var7 = com.aspose.cells.b.a.ze.f(((zak)this.e.l.a.get(0)).a());
               var8 = 25920;
            } else if (((zak)this.e.l.a.get(0)).b() == 328 && ((zak)this.e.l.a.get(1)).b() == 329) {
               var7 = 1350;
               var8 = com.aspose.cells.b.a.ze.f(((zak)this.e.l.a.get(0)).a());
            }
            break;
         default:
            var7 = 1350;
            var8 = 25920;
         }

         this.n = new int[]{var7, var8};
      }

      float var9 = Math.abs(var5.h() * ((float)var7 / 21600.0F));
      float var10 = Math.abs(var5.i() * ((float)var8 / 21600.0F));
      com.aspose.cells.b.a.b.zm var11 = zbul.a(this.e.m());
      if (var7 > 0 && var8 > 0 && var9 <= var5.h() && var10 <= var5.i()) {
         if (!this.e.m().a()) {
            this.a.a(var11, var5);
         }

         if (!this.e.l().a()) {
            com.aspose.cells.b.a.b.a.ze var14 = new com.aspose.cells.b.a.b.a.ze();
            var14.b(var5);
            com.aspose.cells.b.a.b.zc var15 = zbul.a(this.e.l(), var14);
            this.a.a(var15, var5);
         }

         this.b(this.e.k());
         this.a.a(var6);
      } else {
         zbk var12 = new zbk(i, j, l, this.n, m, 21600, 21600, Integer.MIN_VALUE, Integer.MIN_VALUE, k);
         if (this.e.l().d()) {
            this.e.l().a(Color.getWhite());
         }

         zbj var13 = new zbj(63, var1, var2, var3, var4, this.e.m().c(), this.e.m().f(), this.e.l().b(), var12);
         var13.a((float)this.e.j());
         var13.a(this.a, this.e, var5);
         this.b(this.e.k());
         this.a.a(var6);
      }
   }

   void b(com.aspose.cells.b.a.b.zq var1) {
      this.a.d();
      var1 = zbgj.a(var1);
      if (!this.e.m().a()) {
         var1.a(-(this.e.m().f() / 2.0F), -(this.e.m().f() / 2.0F));
      }

      float var2 = zbul.a(this.e.n());
      if (this.e.p() != 7 && this.e.p() != 9) {
         if (this.e.p() == 0 || this.e.p() == 8) {
            var1.c(var1.h() - var2);
         }
      } else {
         var1.a(var1.f() + var2);
      }

      var1.a(var1.f() + (float)this.e.d().a());
      var1.c(var1.h() - (float)(this.e.d().a() + this.e.d().c()));
      var1.b(var1.g() + (float)this.e.d().b());
      var1.d(var1.i() - (float)(this.e.d().b() + this.e.d().d()));
      if (var1.i() < (float)this.e.n().d()) {
         var1.a(0.0F, ((float)this.e.n().d() - var1.i()) / 2.0F);
         if (var1.i() > this.e.k().i()) {
            var1.d(this.e.k().i());
         }
      }

      if (!this.e.t().equals("\n")) {
         zbul.a(this.a, this.e, var1, this.e.t(), this.e.s(), this.e.n(), this.e.o(), this.e.p(), this.e.q());
      }
   }
}
